﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.IO;
using System.ComponentModel;

namespace Microsoft.Mtool.FSM
{

    [Serializable]
    public enum StateType
    {
        Entry,
        Free,
        Exit
    }

    [Serializable]
    public class State
    {
        private string id;
        private StateType type;

        [XmlAttribute]
        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        [XmlAttribute]
        public StateType Type
        {
            get { return type; }
            set { type = value; }
        }

        private List<Action> nextActions = new List<Action>();

        [Browsable(false)]
        [XmlIgnore]
        public List<Action> NextActions
        {
            get { return nextActions; }
        }

        public State()
        { }

        public State(string id, StateType type)
        {
            this.id = id;
            this.type = type;
        }
    }

}
